home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
magazine
/
c_news
/
09
/
hgraph2
/
mouse.h
< prev
next >
Wrap
C/C++ Source or Header
|
1988-03-26
|
4KB
|
87 lines
#include <dos.h>
#define ON 1
#define OFF 0
#define MOVED 1
#define LBPRESS 2
#define LBREL 4
#define RBPRESS 8
#define RBREL 16
int m_init(int *buttons);
void m_cursor(int on);
int m_status(int *hpos,int *vpos);
void m_move(int hpos,int vpos);
void m_limit(int hmin,int hmax,int vmin,int vmax);
void m_shape(int seg,int *shape);
void m_texts(int andmask,int xormask);
void m_texth(int block);
void m_mickey(int *hcount, int *vcount);
void m_gosub(int event,int seg,int offset);
void m_lpen(int on);
void m_ratio(int hratio,int vratio);
void m_auto(int x1,int y1,int x2,int y2);
int m_info_p(int button,int *presses,int *hpos,int *vpos);
int m_info_r(int button,int *releases,int *hpos,int *vpos);
/* several handy graphics mouse cursor shapes
first 16 ints are the AND mask (all bits which will NOT be
changed are set ==1)
next 16 ints are the XOR mask (all bits which will be
changed to fg color are
set ==1)
last 2 ints are the horizontal and vertical HOTSPOTS
respectively, HOTSPOT is the location returned as the
current mouse position, HOTSPOT is relative to upper
left corner of mouse cursor
example:
stndl= AND mask XOR mask
HOT SPOT ------> 0011111111111111 0000000000000000
0001111111111111 0100000000000000
0000111111111111 0110000000000000
0000011111111111 0111000000000000
0000001111111111 0111100000000000
0000000111111111 0111110000000000
0000000011111111 0111111000000000
0000000001111111 0111111100000000
0000000000111111 0111111110000000
0000000000011111 0111111111000000
0000000111111111 0111111000000000
0001000011111111 0100011000000000
0011000011111111 0000011000000000
1111100001111111 0000001100000000
1111100001111111 0000001100000000
1111110000111111 0000000110000000
HOT SPOT = 0,0
*/
int stndl[34]={0x3FFF,0x1FFF,0x0FFF,0x07FF,0x03FF,0x01FF,0x00FF,0x007F,
0x003F,0x001F,0x01FF,0x10FF,0x30FF,0xF87F,0xF87F,0xFC3F,
0x0000,0x4000,0x6000,0x7000,0x7800,0x7C00,0x7E00,0x7F00,
0x7F80,0x7FC0,0x7C00,0x4600,0x0600,0x0300,0x0300,0x0180,
0x0000,0x0000};
int hand[34]={0xE1FF,0xE1FF,0xE1FF,0xE1FF,0xE1FF,0xE000,0xE000,0xE000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x1E00,0x1200,0x1200,0x1200,0x1200,0x13FF,0x1249,0x1249,
0xF249,0x9001,0x9001,0x9001,0x8001,0x8001,0x8001,0xFFFF,
0x0005,0x0000};
int xmark[34]={0x07E0,0x0180,0x0000,0xC003,0xF00F,0xC003,0x0000,0x0180,
0x07E0,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
0x0000,0x700E,0x1C38,0x0660,0x03C0,0x0660,0x1C38,0x700E,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0007,0x0004};
int check[34]={0xFFF0,0xFFE0,0xFFC0,0xFF81,0xFF03,0x0607,0x000F,0x001F,
0xC03F,0xF07F,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
0x0000,0x0006,0x000C,0x0018,0x0030,0x0060,0x70C0,0x1D80,
0x0700,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0006,0x0007};
int glass[34]={0x0000,0x0000,0x0000,0x0000,0x8001,0xC003,0xE007,0xF00F,
0xE007,0xC003,0x8001,0x0000,0x0000,0x0000,0x0000,0xFFFF,
0x0000,0x7FFE,0x6006,0x300C,0x1818,0x0C30,0x0660,0x03C0,
0x0660,0x0C30,0x1998,0x33CC,0x67E6,0x7FFE,0x0000,0x0000,
0x0007,0x0007};